package com.design.pattern.singleton.lazy;/*  ClassPath : LazyStaticInnerClassSingleton.class              LazyStaticInnerClassSingleton$LazyHolder.class   优点：写法优雅，利用了Java本身语法特点，性能高，避免了内存浪费,不能被反射破坏   缺点：不优雅   create by yufeng on 2021/7/3 21:12 */public class LazyInnerClassSingleton {    private LazyInnerClassSingleton(){    }    private static final LazyInnerClassSingleton getInstance(){        return LazyHolder.LAZY;    }    private static class LazyHolder{        private static final LazyInnerClassSingleton LAZY = new LazyInnerClassSingleton();    }}